import 'mood_track_point.dart';

class MoodPointImage {
  int? id;
  int? pointId;
  String? imageUrl;
  DateTime? uploadedAt;

  MoodPointImage({
    this.id,
    this.pointId,
    this.imageUrl,
    this.uploadedAt,
  });

  factory MoodPointImage.fromJson(Map<String, dynamic> json) => MoodPointImage(
    id: json['id'],
    pointId: json['point'],
    imageUrl: json['imageUrl'],
    uploadedAt: json['uploadedAt'] != null ? DateTime.parse(json['uploadedAt']) : null,
  );

  Map<String, dynamic> toJson() => {
    'id': id,
    'pointId': pointId,
    'imageUrl': imageUrl,
    'uploadedAt': uploadedAt?.toIso8601String(),
  };

  @override
  String toString() {
    return 'MoodPointImage{id: $id, pointId: $pointId, imageUrl: $imageUrl, uploadedAt: $uploadedAt}';
  }


}
